/**
 * 
 */
package soa.security.domain;

import javax.naming.Name;

import org.springframework.ldap.odm.annotations.DnAttribute;
import org.springframework.ldap.odm.annotations.Entry;
import org.springframework.ldap.odm.annotations.Id;

/**
 * @author Cre.Gu
 *
 */
@Entry(objectClasses = { "organizationalUnit", "top" })
public final class OrganizationUnit {

	@Id
	private Name dn;

	@DnAttribute(value = "ou", index = 0)
	private String ou;

	private String description;

	public OrganizationUnit() {
	}

	public OrganizationUnit(String ou, String description) {
		super();
		this.ou = ou;
		this.description = description;
	}

	public static OrganizationUnit build(String ou, String description) {
		return new OrganizationUnit(ou, description);
	}

	public Name getDn() {
		return dn;
	}

	public void setDn(Name dn) {
		this.dn = dn;
	}

	public String getOu() {
		return ou;
	}

	public void setOu(String ou) {
		this.ou = ou;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

}
